function ind = getParamsIndex(classes,i,j=0)
    if(j==0)
        ind=i;    
    else
        ind=sum(classes:-1:classes-i+1)+j-i;
    endif;
endfunction;
